﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Web;
using System.Xml;
using InfoJetSoft.Service.Entity;

//CID 1990 //2013.11.09 //Begin
namespace InfoJetSoft.Service.Util
{
    class UrlFields
    {
        //CID 1990 //2013.11.09 //Begin
        public static void Import(Form form)
        { 
            NameValueCollection requestParams = System.Web.HttpContext.Current.Request.Params;
            foreach (string paramKey in requestParams)
            {
                if (paramKey.StartsWith("~"))
                {
                    string paramName = paramKey.Substring(1);
                    string paramValue = requestParams[paramKey];
                    XmlElement element = QuickSelectUtil.SearchChildElementByLocalName(form.XmlDoc.DocumentElement, paramName);
                    if (element != null)
                    {
                        element.InnerText = paramValue;
                    }
                }
            }
        }
        //CID 1990 //2013.11.09 //End
    }
}
//CID 1990 //2013.11.09 //End